import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

//导入自动引入插件
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { VantResolver } from '@vant/auto-import-resolver'


export default defineConfig({
  plugins: [
    vue(),
    	// 配置 自动引入
		AutoImport({
      imports:['vue','vue-router','pinia'],
			resolvers: [VantResolver()],
		}),
		Components({
      //配置组件自动引入
      dirs:['src/components','src/components/**/*'],
      dts: "./components.d.ts", //默认路径
			//组件的有效文件扩展名
			extensions: ['vue'],
			resolvers: [VantResolver()],
		}),
  
  ],

  server:{
    //设置端口
    port: 921,
    open: true
  },

 

})
